package com.ruoyi.project.insurance.insurance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.insurance.insurance.mapper.insuranceMapper;
import com.ruoyi.project.insurance.insurance.domain.insurance;
import com.ruoyi.project.insurance.insurance.service.IinsuranceService;
import com.ruoyi.common.utils.text.Convert;

/**
 * insuranceService业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-08
 */
@Service
public class insuranceServiceImpl implements IinsuranceService 
{
    @Autowired
    private insuranceMapper insuranceMapper;

    /**
     * 查询insurance
     * 
     * @param id insurance主键
     * @return insurance
     */
    @Override
    public insurance selectinsuranceById(String id)
    {
        return insuranceMapper.selectinsuranceById(id);
    }

    /**
     * 查询insurance列表
     * 
     * @param insurance insurance
     * @return insurance
     */
    @Override
    public List<insurance> selectinsuranceList(insurance insurance)
    {
        return insuranceMapper.selectinsuranceList(insurance);
    }

    /**
     * 新增insurance
     * 
     * @param insurance insurance
     * @return 结果
     */
    @Override
    public int insertinsurance(insurance insurance)
    {
        return insuranceMapper.insertinsurance(insurance);
    }

    /**
     * 修改insurance
     * 
     * @param insurance insurance
     * @return 结果
     */
    @Override
    public int updateinsurance(insurance insurance)
    {
        return insuranceMapper.updateinsurance(insurance);
    }

    /**
     * 批量删除insurance
     * 
     * @param ids 需要删除的insurance主键
     * @return 结果
     */
    @Override
    public int deleteinsuranceByIds(String ids)
    {
        return insuranceMapper.deleteinsuranceByIds(Convert.toStrArray(ids));
    }

    /**
     * 根据险种名称查询险种信息
     *
     * @param insuranceName 险种名称
     * @return 结果
     */
    @Override
    public insurance selectInsuranceByInsuranceName(String insuranceName)
    {
        return insuranceMapper.selectInsuranceByInsuranceName(insuranceName);
    }

    /**
     * 删除insurance信息
     * 
     * @param id insurance主键
     * @return 结果
     */
    @Override
    public int deleteinsuranceById(String id)
    {
        return insuranceMapper.deleteinsuranceById(id);
    }
}
